package ooday02;

public class Person {
    //基类
    public String name;
    public int age;
    public String address;
    //int a;
    public Person(){}
    //                  "李四",    18,         "北京"
    public Person(String name,int age,String address){
        //"李四",18,"北京"
        this.name=name;
        this.age=age;
        this.address=address;
    }

    public void eat(){
        System.out.println(name+"吃饭");
    }
    public void sleep(){
        System.out.println(name+"睡觉");
    }
    public void sayHi(){
        System.out.println("大家好，我是"+name+"，今年"+age+"岁了"+"，来自"+address+"。");
    }
}
